package com.briup.pts.domain.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PastOrPresent;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 检疫登记
* @TableName quarantine_registration
*/
@Data
public class QuarantineRegistration implements Serializable {

    /**
     * 记录id
     */
    private Integer grId;
    /**
     * 检疫时间
     */
    @NotNull(message = "检疫时间不能为空")
    @PastOrPresent(message = "检疫时间不能晚于当前时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime grTime;
    /**
     * 检疫证明图片
     */
    @NotBlank(message = "检疫证明图片必须上传")
    private String grImg;
    /**
     * 检疫机构
     */
    @NotBlank(message = "检疫机构必须指定")
    private String grMechanism;
    /**
     * 批次id
     */
    @NotBlank(message = "检疫的动物批次必须指定")
    private String grBatchId;
    /**
     * 检疫结果
     */

    @NotBlank(message = "检疫结果必须填写")
    private String bQualified;
}

